package com.yc.damai;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

@SpringBootApplication(scanBasePackages="com.yc.damai.web")
// @EnableEurekaClient
@EnableFeignClients
public class IndexApp implements WebMvcConfigurer {

    public static void main(String[] args) {
        SpringApplication.run(IndexApp.class, args);
    }

    @Override
    public void addResourceHandlers(ResourceHandlerRegistry registry) {
        registry.addResourceHandler("/**")
                .addResourceLocations("file:F:\\_文件柜\\133\\组员(李四)\\yc-133" +
                        "\\damai-parent\\damai-index\\src\\main\\resources" +
                        "\\static/");
        registry.addResourceHandler("/mobile/**")
                .addResourceLocations("file:F:\\_文件柜\\133\\组员(李四)\\yc-133\\damai-parent" +
                        "\\damai-user\\src\\main\\resources\\static\\mobile/");
    }
}
